<template>
  <!-- <a工具栏 :list="list" :详情_抽屉式="详情" /> -->
  <a工具栏 :list="list" />
  <el-table :ref="list.表ref" border tooltip-effect="dark" :data="单项组" row-key="id" @selection-change="list.选中变了"
    class="全高-工具栏-60" @sort-change="list.sortChange" :default-sort="a.默认排序" empty-text="空空如也~~">
    <el-table-column type="selection" width="40" />
    <!-- <el-table-column align="left" label="id" width="60" prop="id" /> -->

    <template v-for="字段 in 插组件.列表显示字段s.value" :key="字段.名称">
      <a列表字段 :插组件="插组件" :字段="字段" :编辑否="list.a.编辑否" />
    </template>

    <!-- 末尾列 -->
    <el-table-column align="left" sortable label="修改时间" prop="UpdatedAt" width="180">
      <template #default="scope">{{ formatDate(scope.row.UpdatedAt) }}</template>
    </el-table-column>
    <el-table-column align="left" label="操作" fixed="right">
      <template #default="scope">
        <!-- <el-button type="danger" link icon="DocumentCopy" @click="详情.复制(scope.row)">复制</el-button> -->
        <el-button type="danger" link icon="delete" @click="list.删(scope.row)">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
  <div class="gva-pagination">
    <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="req.page" :page-size="req.pageSize"
      :page-sizes="a.可选页面容量" :total="a.total" @current-change="list.跳转页面" @size-change="list.改单页条数" />
  </div>
  <!-- <a详情 ref="详情ref" :list="list" :关联组件id="关联组件id"></a详情> -->
</template>

<script setup>
import { ref, reactive, onMounted, onBeforeUnmount, watch } from 'vue'
import { useDebounceFn } from '@vueuse/core';
import a列表字段 from '@/components/a列表字段.vue';
const props = defineProps({
  关联组件id: String,
  插组件: Object,
})
console.log(`props.url 👉`, props.url)
import use from '@/hooks/uselist';
const list = use({}, props.插组件)
const { 插组件, a, 单项组, req } = list

req.pageSize = 50
const 详情ref = ref()
// import use详情_抽屉式 from '@/hooks/use详情_抽屉式';
// const 详情 = use详情_抽屉式({ 查多个: list.查多个 })
// const { 弹窗否, 单项, 初始化, formRef, rule } = 详情


// import a详情 from './详情_抽屉式2.vue'
// let 详情
// onMounted(() => {
//   详情 = 详情ref.value.详情
// })

import SelectImage from '@/components/selectImage/selectImage.vue'
import { getDictFunc, formatDate, formatBoolean, filterDict, filterDataSource, returnArrImg, onDownloadFile } from '@/utils/format'

defineExpose({ list })

</script>

<style lang="scss" scoped></style>
